let seconds = 0
let minute = 0
let hour = 0

setInterval(() => {
    if(seconds==59){
        seconds=0
        minute++
    }
    else{
        seconds++
    }
    if(minute==59){
        minute=0
        hour++
    }
    console.log(judge(hour)+":"+judge(minute)+":"+judge(seconds));
}, 1000);

function judge(time){
    let str = time.toString()
    if(str.length==1){
        return '0'+str
    }
    else{
        return str
    }
}